<!--
- Author:   .
- Date:    2017/7/18 0018.
- File:    express.
-->
<template>
  <div class="Web_Box nb bg_fff">
    <div class="ViewLogistics">
      <!--<div class="head">-->
        <!--<div class="LogisticsLogo"><img src="/static/images/LogisticsLogo.png" alt=""/></div>-->
        <!--<div class="text">-->
          <!--<p class="f30">{{orderExpress.com}}</p>-->
          <!--<p class="f26">运单编号：{{orderExpress.nu}}</p>-->
        <!--</div>-->
      <!--</div>-->
      <div class="head">
        <!--<div class="LogisticsLogo"><img src="res1/wap/images/classification6.png"></div>-->
        <div class="text">
          <p class="f30">物流状态：{{orderExpress.state | expressStatusTxt}}</p>
          <p class="f26">运单来源：{{orderExpress.com}}</p>
          <p class="f26">运单编号：{{orderExpress.nu || ''}}</p>
        </div>
      </div>
      <div class="list">
        <div class="LeftIndex"></div>
        <ul v-if="orderExpress.data">
          <li v-for="(item, index) in orderExpress.data">
            <p class="text1">{{item.time}}</p>
            <p class="text2" :class="{'cr_00ae00': index == 0}">{{item.context}}</p>
          </li>
        </ul>
      </div>
    </div>
    <back-nav></back-nav>
  </div>
</template>

<script>
  export default{
    data() {
      return {
        orderId: this.$route.params.id,
        orderExpress: {}
      }
    },
    components: {},
    created() {
      this.getOrderExpress(this.orderId)
    },
    methods: {
      getOrderExpress(id) {
        this.$request.getOrderExpress(id).then(data => {
          if (data && data.data) {
            this.orderExpress = data
          }
        }).catch(e => {
          this.$toast('获取物流信息失败' + e.msg)
        })
      }
    }
  }
</script>

<style>

</style>